package com.lanwon.exception;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**   
 * <p>Title：GlobalExceptionAutoConfigure</P>
 * <p>说明： 统一异常处理starter</P>
 * <p>Company: 蓝网科技</p >
 * @project 通用组件 V1.0
 * @author: LiuYZ
 * @date  2019年5月20日
 */
@Configuration
@ConditionalOnClass(GlobalExceptionHandler.class)
public class GlobalExceptionAutoConfigure {
 
    @Bean
    @ConditionalOnMissingBean
    GlobalExceptionHandler globalExceptionHandler (){
        return  new GlobalExceptionHandler();
    }
 
}
